home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / program / snpd9611.zip / STRDEL.C < prev    next >
C/C++ Source or Header  |  1996-11-24  |  834b  |  28 lines

  1. .I 0 2
  2. /* +++Date last modified: 24-Nov-1996 */
  3.  
  4. .I 4 7
  5. **
  6. **  NOTE: The name of this funtion violates ANSI/ISO 9899:1990 sec. 7.1.3,
  7. **        but this violation seems preferable to either violating sec. 7.13.8
  8. **        or coming up with some hideous mixed-case or underscore infested
  9. **        naming. Also, many SNIPPETS str---() functions duplicate existing
  10. **        functions which are supported by various vendors, so the naming
  11. **        violation may be required for portability.
  12. .I 9 5
  13. #if defined(__cplusplus) && __cplusplus
  14.  extern "C" {
  15. #endif
  16.  
  17. char *strdel(char *str, size_t posn, size_t len)
  18. .D 10 1
  19. .I 29 4
  20. #if defined(__cplusplus) && __cplusplus
  21.  }
  22. #endif
  23.  
  24. .I 46 2
  25.       printf("strdel(\"%s\", %d, %d) => ", argv[1], pos, len);
  26.       printf("\"%s\"\n", strdel(argv[1], pos, len));
  27. .D 47 2
  28.